package pack

import (
	"mall_admin_api/biz/model"
	"mall_admin_api/biz/model/admin_express"
)

func GetExpressList(list []*model.Express) []*admin_express.Express {
	var data = make([]*admin_express.Express, 0)
	if len(list) == 0 {
		return data
	}
	for _, category := range list {
		if category != nil {
			data = append(data, Express(category))
		}
	}
	return data
}

func Express(data *model.Express) *admin_express.Express {
	var info = &admin_express.Express{}
	if data == nil {
		return info
	}
	info.ID = data.ID
	info.Name = data.Name
	info.Code = data.Code
	info.Sort = data.Sort

	return info
}
